import instance from "./Request";

// 获取数据
export const http_get = () => {
    return instance.get('/tablelxt')
}


// 删除
export const http_del = (id: number) => {
    return instance.delete(`/tablelxt/${id}`)
}

// 添加
export const http_add = (obj: any) => {
    return instance.post('/tablelxt', obj)
}

// 编辑
export const http_edit = (obj: any) => {
    return instance.patch(`/tablelxt/${obj.id}`, obj)
}

// 搜索
export function searchd(obj: any) {
    return instance.get('/tablelxt', {
        params: {
            title_like: obj?.title ? obj?.title : undefined,
            name_like: obj?.name ? obj?.name : undefined
        }
    })
}